package com.laizhenghua.demo.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.headers.Header;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * TODO
 *
 * @Description
 * @Author laizhenghua
 * @Date 2023/6/26 21:51
 **/
@Configuration
public class SwaggerConfiguration {
    @Bean
    public OpenAPI springShopOpenAPI() {
        return new OpenAPI().info(new Info().title("security")
                .description("security")
                .version("v1"))
                .components(new Components().addHeaders("token",
                        new Header().required(true)));
    }
}
